﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BoxManager : MonoBehaviour
{
    public float timeInterval;                        //销毁时间间隔
    private float timeBuffer = 0;                     //缓冲时间计数器
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        timeBuffer += Time.deltaTime;
        if (timeInterval <= timeBuffer)
        {
            //时刻已到

            /*
             * 这里填充相关处理函数
             */

            Destroy(this.gameObject);
        }
    }
}
